<?
dbgInfo("\$_SESSION[\"modify_mode\"]",$_SESSION["modify_mode"]);
$stlButton  = " style='width:160;height:80;   font-size:150%;  font-weight:bold;' ";

$stdStyle   = " style='color: sienna;'";
                      //"margin-left: 20px' ";
$numStyle   = " style='text-align: right' ";
//$stdPrp     = " onFocus='setYellow(this);' ".
//              " onBlur ='setWhite(this);' ";
$noNullPrp  = " onFocus='setYellow2(this);' ".
              " onBlur ='setWhite2(this); ".
                        "noVal(this)' ";

$qtyInPrp       = " onFocus='setYellow2(this);' ".
                            
                  " onBlur ='setWhite2(this);' ";

$stdProperties  = " onFocus='setYellow2(this);' ".
                            
                  " onBlur ='setWhite2(this);' ";

$valNull = "";
                  
$COracle = new oracleDb;
$COracle->init($_SESSION["ORCL"], 
               $_SESSION["OPASS"],
               $_SESSION["SID"],
               _NO_COMMENT);

$srcDbSupplier = "CUSTOMER";
$srcDbCurrency = "MST_CURRENCY";

if($COracle->connect()){
  
  $_POST["memoEnt"] = ($_POST["memoEnt"] != "")? $_POST["memoEnt"] : "default";
  
  fetchLstSupplier($COracle,
                   $lstSupplier,
                   $srcDbSupplier);
  
  fetchLstCurrency($COracle,
                   $srcDbCurrency,
                   $lstCurrency);
                   
  $propCurrency = " onChange='getRate(this.value,
                                      \"rateEnt\") ' ";
                                                       
  echo 	//Global misc function of js
        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"../javascript/misc.js\"></SCRIPT> \n".
        
        //This modul misc.js collections of function
        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"javascript/misc.js\"></SCRIPT> \n".
        
        //The ajax connections
        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"javascript/ajax.js\"></SCRIPT> \n". 
        
        "<SCRIPT LANGUAGE=\"JavaScript\" SRC=\"../javascript/CalendarPopup.js\"></SCRIPT> \n".
  			"<SCRIPT LANGUAGE=\"JavaScript\">\n".
  			"var cal      = new CalendarPopup();\n".
  			"var gStatus    = Array();\n".
  			"    gStatus[0] = false;\n".
  			"</SCRIPT> \n".
  			
  			"<link rel=\"stylesheet\" type=\"text/css\" href=\"../myMenu.css\"/>\n".
   			
   			"<form  name='initMe' action='entry.php' method=post>\n".
   			
   			/**
   			* Global header
   			*
   			*/
  			"<table border='1' class='dedeq' >\n".
  			"<tr>\n".
  			"  <td ><b>DATE     <input type='submit' onClick=\"cal.select(document.forms['initMe'].trDateEnt,'anchor1','dd-MM-yyyy'); return false;\" NAME=\"anchor1\" ID=\"anchor1\" value='Select'></b></td> </td><td >		<input type='text' name='trDateEnt' value='" .$_POST["trDateEnt"]. "' maxlength='11' ".$stdStyle." ".$stdPrp." ><br/></td>\n".
  			"  <td ><b>SUPPLIER </b></td> </td><td > ".formDropDown("supplierEnt",
                                                                $_POST["supplierEnt"],
                                                                $lstSupplier,
                                                                $stdStyle . $stdPrp)." <br/></td>\n".
                                                                
  			"</tr>\n".
  			"<tr>\n".
  			"  <td ><b>CURRENCY </b></td> </td><td > ".formDropDown("currencyEnt",
                                                                $_POST["currencyEnt"],
                                                                $lstCurrency,
                                                                $propCurrency )."
                                                 <br/></td>\n".
                                                 
  			"  <td ><b>RATE     </b></td> </td><td > ".formInput( "rateEnt",
                                                              $_POST["rateEnt"],
                                                              $numStyle. _MODE_READONLY )."
                                                 <br/></td>\n".  
                                                 
  			"</tr>\n".
  			"<tr>\n".
  			"  <td colspan='2' align='right'><b>MEMO    </b></td> </td><td colspan='2'> <textarea type='text' name='memoEnt' maxlength='100'/>".$_POST["memoEnt"]." </textarea><br/></td>\n".  
  			 
  			"</tr>\n".
  			"</table><br/>\n";
  			
  $COracle->dc();
}else{

  usrDie("Oracle Connection Failed");
}
?>
